package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.SeckillProductVo;
import cn.wolfcode.feign.fallback.SeckillFeignFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author LuoRis
 * @date 2021/03/05 18:47
 * @description 远程调用
 */
@FeignClient(name = "seckill-service" , fallback = SeckillFeignFallBack.class)
public interface SeckillFeignApi {
    /**
     * 服务之间的调用返回值要用JSON格式
     * @param time
     * @return
     */
    @RequestMapping("/seckillProduct/queryCurrentlySeckillProduct")
    Result<List<SeckillProductVo>> queryCurrentlySeckillProduct(@RequestParam("time") String time);
}
